package org.extframework.ld.http.filter;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;

import org.extframework.ld.conf.ParameterNames;
import org.extframework.ld.http.abstr.AbstractEncryptionWebFilter;
import org.extframework.ld.http.abstr.AbstractEncryptionWebRequest;
import org.extframework.ld.http.abstr.AbstractEncryptionWebResponse;

public class SessionUserFilter  extends AbstractEncryptionWebFilter {

	public void doFilter(
			AbstractEncryptionWebRequest request,
			AbstractEncryptionWebResponse response,
			FilterChain chain) {
		Object obj = request.getSession().getAttribute(ParameterNames.LOGIN_USER_MARK);
		if(obj == null){
			System.out.println("没有登录用户");
		}
		try {
			chain.doFilter(request, response);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ServletException e) {
			e.printStackTrace();
		}
	}

}
